<template>
  <div class="student">
    <h2>学生姓名：{{ name }}</h2>
    <h2>学生性别：{{ sex }}</h2>
    <button @click="showName">显示名称</button>
  </div>
</template>

<script>
import { showNameMixin, xyMixin, mountedMixin } from "../mixins";

export default {
  name: "Student",
  data() {
    return {
      name: "张三",
      sex: "男",
      x: 666,
    };
  },
  mounted() {
    console.log("Student mounted");
  },
  mixins: [showNameMixin, xyMixin, mountedMixin],
};
</script>

<style scoped>
.student {
  background-color: plum;
  color: white;
}
</style>
